target_compile_options(${PROJECT_NAME} PRIVATE -Wformat)
target_compile_options(${PROJECT_NAME} PRIVATE -Werror=format-security)
target_compile_options(${PROJECT_NAME} PRIVATE -Werror=format-nonliteral)
+target_compile_options(${PROJECT_NAME} PRIVATE -Wimplicit-fallthrough=5)
target_compile_options(${PROJECT_NAME} PRIVATE -Wno-unused-parameter)
target_compile_options(${PROJECT_NAME} PRIVATE -Wmissing-declarations)
case DHCPV6_MSG_REBIND:
if (t2 != UINT32_MAX)
t2 = 0;
- // Fall through
+ _o_fallthrough;
case DHCPV6_MSG_RENEW:
if (t1 != UINT32_MAX)
t1 = 0;
- // Fall through
+ _o_fallthrough;
case DHCPV6_MSG_INFO_REQ:
msg = odata[0];
syslog(LOG_NOTICE, "Need to respond with %s in reply to %s",
default:
syslog(LOG_NOTICE, "Send %s message (elapsed %"PRIu64"ms, rc %d)",
retx->name, elapsed, retx->rc);
- // Fall through
+ _o_fallthrough;
case DHCPV6_MSG_SOLICIT:
case DHCPV6_MSG_INFO_REQ:
dhcpv6_send(type, retx->tr_id, elapsed / 10);
#define _o_aligned(n) __attribute__((aligned(n)))
#endif /* _o_aligned */
+#ifndef _o_fallthrough
+#define _o_fallthrough __attribute__((__fallthrough__))
+#endif /* _o_fallthrough */
+
#ifndef _o_packed
#define _o_packed __attribute__((packed))
#endif /* _o_packed */